//
//  DataRequest.h
//  AppleCilent
//
//  Created by Nail Sharipov on 02/04/14.
//  Copyright (c) 2014 Nail Sharipov. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface DataRequest : NSObject

typedef void (^DataReadyHandler)(NSMutableData*);
typedef void (^DownloadFinishedHandler)(NSString*);

-(void)getURL: (NSURL*)url onReady: (DataReadyHandler) onReadyHandler;

-(void)sendToURL: (NSURL*)url parameters:(NSString*)params onReady: (DataReadyHandler) onReadyHandler;

-(void)downloadURL: (NSURL*)url fileName: (NSString*)fileName folder: (NSString*)folder onReady: (DownloadFinishedHandler) onReadyHandler;

@end
